The invention relates generally to the field of digital data processing systems and more specifically to systems and methods for facilitating maintenance of global information which control certain computer operations in a computer system. In particular, the invention provides an arrangement for use in connection with applications programs operating under, for example, the Microsoft Windows(trademark) operating system, which provides an environment in which a number of applications programs may be contemporaneously executed, for facilitating the maintenance of global information for each applications program.
In performing processing operations, computer systems make use of applications programs to perform such operations as database management, word processing, accounting, process control and numerous other functions in an office or industrial environment. The applications programs generally make use of operating system programs both to provide an environment in which they can be conveniently executed and to provide system services such as low-level control of various hardware elements. One popular operating system program, namely, Microsoft Windows(trademark) (xe2x80x9cWindowsxe2x80x9d) operates in conjunction with Microsoft""s MS-DOS operating system program to provide an environment in which applications programs written for Windows can be executed. The Windows operating system program provides, among other things, a graphical user interface (xe2x80x9cGUIxe2x80x9d) as well as a multi-tasking operating environment in which a plurality of Windows programs can be executing contemporaneously. Windows also provides an environment in which other applications programs written for MS-DOS can be executed. Since MS-DOS applications programs are typically designed on the assumption that only services provided by MS-DOS will be provided, such as low-level control of the computer system hardware, but not those services provided by Windows, MS-DOS programs will not take advantage of the additional services, such as the GUI and multi-tasking, provided by Windows.
In facilitating multi-tasking operation, Windows provides a so-called xe2x80x9cvirtual machinexe2x80x9d environment for the applications programs which is concurrently executing. The virtual machine environment can help protect against incorrect operation by one applications program, operating in one virtual machine, corrupting another applications program""s programs and data. In addition, Windows provides a xe2x80x9cglobalxe2x80x9d environment which controls the selection of the virtual machines to be run, provides operating system services thereto, and provides global registers that control certain operational characteristics by the hardware. The applications programs operating in the respective virtual machines, as well as the operating system program, can control the states of certain of the global registers to, in turn, control the hardware. Several virtual machines may be enabled contemporaneously and run in an interleaved manner, and so it is important to ensure that the global registers contain the correct state for each virtual machine when it is being executed.
The invention provides a new and improved system and method for facilitating maintenance of global information which control certain computer operations in a multi-tasked computer system.
In brief summary, in one aspect the invention provides a computer system including a global machine for providing a virtual machine for a plurality of applications programs, including a calling applications program and a called applications program which is called by said calling applications program, and further provides a global state store for storing selected global state information for controlling selected operations. The calling program conditions the global state information stored in the global state store to a calling program global state, performs predetermined calling program processing operations and calls the called applications program. The called program, upon being called by the calling program, saves the calling program global information contained in the global state store. The calling program further conditions the global state information in the global state store to a called program global state, performs predetermined called program processing operations, and thereafter restores the saved calling program global state to the global state information store and returns control to the calling program, thereby to ensure that, when the calling program is again processed, the global state information will be proper for the calling program.